<?php

class Application_Form_Menu extends Zend_Form
{
    public function init()
    {
        $this->setName('Menu');

        $menu_id = new Zend_Form_Element_Hidden('menu_id');
        $menu_id->addFilter('Int');

        $name = new Zend_Form_Element_Text('name');
        $name->setLabel('name')
              ->setRequired(true)
              ->addFilter('StripTags')
              ->addFilter('StringTrim')
              ->addValidator('NotEmpty');
              
        $description = new Zend_Form_Element_Text('description');
        $description->setLabel('description')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
                         
        $user_id = new Zend_Form_Element_Text('user_id');
        $user_id->setLabel('user_id')
        					  ->addFilter('Int');

        $user_name = new Zend_Form_Element_Text('user_name');
        $user_name->setLabel('user_name')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
       
        $created_date = new Zend_Form_Element_Text('created_date');
        $created_date->setLabel('created_date')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
                     					  
       	$language = new Zend_Form_Element_Text('language');
        $language->setLabel('language')
               ->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
        
        $this->addElements(array($menu_id, $name, $description, $user_id, $user_name, $created_date, $language));
    }
}